import Environment from "../../utils/environment";
export default {
    initHeatMap(value, viewer, obj) {
        if (obj != null) {
            viewer.imageryLayers.remove(obj);
        }
        var rectangle = Cesium.Rectangle.fromDegrees(110.35430145, 31.3756321479, 116.64430145, 36.3556321479);
        let STP = viewer.imageryLayers.addImageryProvider(
            new Cesium.SingleTileImageryProvider({
                url: Environment.getDataBasePath() + "/file/heatMap/" + value + ".png",
                rectangle: rectangle
            })
        );

        return STP;
    },

    deleteHeatMap(viewer, STP) {
        if(STP != null){
            viewer.imageryLayers.remove(STP);
        }
    }
};
